package com.chongchong.flow.constant;


import lombok.Getter;

/**
 * @Author:tlp
 * @Date:2022-08-11 10:04
 * @Desc:
 */
@Getter
public enum StatusEnum {


	/**
	 *
	 */
    SAVE(0,"save","保存草稿_save"),
	SUBMIT(1,"submit","提交"),
    PRI_ACCESS(2,"priAccess","一级审批通过"),
	SEC_ACCESS(3,"secAccess","二级审核通过"),
	REFUSE(4,"refuse","拒绝"),
	UPDATE(5,"update","修改"),

	;

	StatusEnum(Integer value, String code, String desc) {
		this.value = value;
		this.code = code;
		this.desc = desc;
	}

	private final Integer value;
	private final String code;
	private String desc;



	public static StatusEnum getEnum(Integer value) {
		StatusEnum[] ecs = StatusEnum.values();
		for (StatusEnum ec : ecs) {
			if (ec.getValue().equals(value)) {
				return ec;
			}
		}
		return null;
	}





}
